<template>
    <div class="w100p relative" :id="id">
        <a-tree-select
            :getPopupContainer="getContainer"
            v-model="defaultValus"
            show-search
            :allow-clear="allowClear"
            :treeNodeFilterProp="'title'"
            style="width:100%;"
            :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
            :tree-data="areaList"
            :placeholder="placeholder"
            :multiple="multiple"
            :replaceFields="FieldsObj"
            @change="changeType"
        >
        </a-tree-select>
    </div>

</template>

<script>
import global from "@/assets/js/global";
export default {
    name: "selectArea",
    props:{
        lastLevel:{
            type:Number, // 大于几级之后不能选择
        },
        source:{
        //    当前选中的内容

        },
        multiple:{
            // 是否可以多选
            type:Boolean,
            default:false,
        },
        placeholder:{
            type:String,
            default:"请选择"
        },
        allowClear:{
            type:Boolean,
            default:true,
        },
        notAllowArr:{
            // 不能被选择的ID数组
            type:Array,
            default(){
                return []
            },
        }
    },
    watch:{
        source:{
            deep:true,
            handler(value){
                if(this.multiple){
                    this.defaultValus = value ? [...value] : undefined
                }else{
                    this.defaultValus = value || undefined
                }
            },
        },
        notAllowArr:{
            deep:true,
            handler(value){
                this.disabledItem(this.areaList)
            },
        }
    },
    beforeMount() {
        this.getAreaList()
        if(this.multiple){
            this.defaultValus = this.source ? [...this.source] : undefined
        }else{
            this.defaultValus = this.source || undefined
        }
    },
    mounted() {

    },
    data(){
        return{
            id:global.getRandomId(),
            FieldsObj: {
                title: "name",
                value: "id",
                key: "id",
                children: "subRooms",
            },
            areaList:[],
            defaultValus:'',
        }
    },
    methods:{
        disabledItem(arr){
            arr.map((item)=>{
                if((item.level >= this.lastLevel && this.lastLevel) || this.notAllowArr.includes(item.id)){
                    item.disabled = true;
                }
                if(item.subRooms && item.subRooms.length){
                    this.disabledItem(item.subRooms)
                }
            })
        },
        getContainer(){
            // 指定父级容器,解决滚动条滚动时,选择框跟着移动的问题
            return document.getElementById(this.id)
        },
        changeType(value){
            this.$emit('changeArea',value)
        },
        getAreaList() {
            this.areaList = [{
                "accountNames": ["你爹2222222"],
                "childLevel": 3,
                "createDate": "2021-04-20T09:31:28.001",
                "creater": "115510501659643904",
                "description": "我是全厂区哥哥",
                "directorInfos": [{"accountId": "115510501659643904", "avatar": "https://oss.xdeas.com.cn//avatar/xdeas-avatar-16.png", "mobile": "13798182874", "realName": "王琦a有个车间工程师主管", "roleList": [{"accountId": "115510501659643904", "roleCode": "app_v2Admin", "roleDefaultRole": 1, "roleId": "20110315072342068", "roleName": "团队管理员"}]}],
                "id": "153796269314150400",
                "imgs": ["https://oss.xdeas.com.cn/systemWeb/153796267909058560/16311549904825.jpg"],
                "level": 1,
                "materialCount": 1,
                "name": "全厂区的",
                "orgId": "153796267909058560",
                "parentName": "",
                "sortNo": 1,
                "status": 1,
                "subRooms": [{
                    "accountNames": [],
                    "childLevel": 1,
                    "createDate": "2021-09-05T11:54:17.585",
                    "creater": "115510501659643904",
                    "description": "",
                    "directorInfos": [],
                    "id": "203841738207399936",
                    "imgs": [],
                    "level": 2,
                    "materialCount": 0,
                    "name": "这是新增加",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 1,
                    "status": 1,
                    "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-02T19:20:35.863", "creater": "115510501659643904", "description": "223456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567891", "directorInfos": [], "id": "202866890853322752", "imgs": [], "level": 3, "materialCount": 0, "name": "吊袜带", "orgId": "153796267909058560", "parentId": "203841738207399936", "parentName": "这是新增加", "sortNo": 5, "status": 1, "subRooms": []}]
                }, {
                    "accountNames": ["用户7563"],
                    "childLevel": 2,
                    "createDate": "2021-08-30T16:47:50.047",
                    "creater": "115510501659643904",
                    "description": "这是区域描述3213231432这是区域描述3213231432这是区域描述3213231432这是区域描述3213231432这是区域描述3213231432这是区域描述3213231432这是区域描述3213231432这是区域描述3213231432",
                    "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}],
                    "id": "201741283033616384",
                    "imgs": ["https://oss.xdeas.com.cn/systemWeb/153796267909058560/163031327144852.png"],
                    "level": 2,
                    "materialCount": 1,
                    "name": "这是区33域",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 2,
                    "status": 1,
                    "subRooms": [{
                        "accountNames": ["你爹2222222", "13798182903"],
                        "childLevel": 1,
                        "createDate": "2021-08-31T15:59:35.426",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [{"accountId": "115510501659643904", "avatar": "https://oss.xdeas.com.cn//avatar/xdeas-avatar-16.png", "mobile": "13798182874", "realName": "王琦a有个车间工程师主管", "roleList": [{"accountId": "115510501659643904", "roleCode": "app_v2Admin", "roleDefaultRole": 1, "roleId": "20110315072342068", "roleName": "团队管理员"}]}, {"accountId": "187153734663409664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13798182903", "realName": "2903", "roleList": [{"accountId": "187153734663409664", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}],
                        "id": "202091529978777600",
                        "imgs": ["https://oss.xdeas.com.cn/systemWeb/153796267909058560/163056996031564.jpg", "https://oss.xdeas.com.cn/systemWeb/153796267909058560/163056997343932.jpg", "https://oss.xdeas.com.cn/systemWeb/153796267909058560/163056997342188.jpg"],
                        "level": 3,
                        "materialCount": 2,
                        "name": "我是第三v吃不吃v不错v宝宝",
                        "orgId": "153796267909058560",
                        "parentId": "201741283033616384",
                        "parentName": "这是区33域",
                        "sortNo": 1,
                        "status": 1,
                        "subRooms": [{
                            "accountNames": ["用户7563", "15018753353", "你爹2222222", "13172049019", "13798182903"],
                            "childLevel": 0,
                            "createDate": "2021-07-13T11:22:12.476",
                            "creater": "115510501659643904",
                            "description": "",
                            "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}, {"accountId": "152566259219697664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "15018753353", "realName": "王琦5353", "roleList": [{"accountId": "152566259219697664", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}, {
                                "accountId": "115510501659643904",
                                "avatar": "https://oss.xdeas.com.cn//avatar/xdeas-avatar-16.png",
                                "mobile": "13798182874",
                                "realName": "王琦a有个车间工程师主管",
                                "roleList": [{"accountId": "115510501659643904", "roleCode": "app_v2Admin", "roleDefaultRole": 1, "roleId": "20110315072342068", "roleName": "团队管理员"}]
                            }, {"accountId": "141612389500981248", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13172049019", "realName": "睁眼", "roleList": [{"accountId": "141612389500981248", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}, {"accountId": "187153734663409664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13798182903", "realName": "2903", "roleList": [{"accountId": "187153734663409664", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}],
                            "id": "184264718972620800",
                            "imgs": [],
                            "level": 4,
                            "materialCount": 0,
                            "name": "<而家木木地狱下太卡>替我通过",
                            "orgId": "153796267909058560",
                            "parentId": "202091529978777600",
                            "parentName": "我是第三v吃不吃v不错v宝宝",
                            "sortNo": 1,
                            "status": 1,
                            "subRooms": []
                        }]
                    }, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-03T11:31:06.469", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "203111127729573888", "imgs": [], "level": 3, "materialCount": 0, "name": "88888", "orgId": "153796267909058560", "parentId": "201741283033616384", "parentName": "这是区33域", "sortNo": 2, "status": 1, "subRooms": []}, {
                        "accountNames": ["15018753353"],
                        "childLevel": 0,
                        "createDate": "2021-09-03T15:32:29.514",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [{"accountId": "152566259219697664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "15018753353", "realName": "王琦5353", "roleList": [{"accountId": "152566259219697664", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}],
                        "id": "203171874006372352",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "测试新增之后.列表更新",
                        "orgId": "153796267909058560",
                        "parentId": "201741283033616384",
                        "parentName": "这是区33域",
                        "sortNo": 3,
                        "status": 1,
                        "subRooms": []
                    }, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-03T09:48:27.825", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "203085296487632896", "imgs": [], "level": 3, "materialCount": 0, "name": "这是刚刚新增", "orgId": "153796267909058560", "parentId": "201741283033616384", "parentName": "这是区33域", "sortNo": 4, "status": 1, "subRooms": []}, {
                        "accountNames": ["13172049019"],
                        "childLevel": 0,
                        "createDate": "2021-09-03T15:39:54.899",
                        "creater": "115510501659643904",
                        "description": "很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增很长很长的新增",
                        "directorInfos": [{"accountId": "141612389500981248", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13172049019", "realName": "睁眼", "roleList": [{"accountId": "141612389500981248", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}],
                        "id": "203173742086459392",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "啊",
                        "orgId": "153796267909058560",
                        "parentId": "201741283033616384",
                        "parentName": "这是区33域",
                        "sortNo": 5,
                        "status": 1,
                        "subRooms": []
                    }]
                }, {
                    "accountNames": [],
                    "childLevel": 1,
                    "createDate": "2021-09-04T10:36:39.892",
                    "creater": "115510501659643904",
                    "description": "",
                    "directorInfos": [],
                    "id": "203459814578196480",
                    "imgs": [],
                    "level": 2,
                    "materialCount": 0,
                    "name": "大王的",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 3,
                    "status": 1,
                    "subRooms": [{"accountNames": ["用户7563"], "childLevel": 0, "createDate": "2021-09-06T13:59:44.273", "creater": "115510501659643904", "description": "年会", "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}], "id": "204235695290585088", "imgs": ["https://oss.xdeas.com.cn/room/163090798076426.png"], "level": 3, "materialCount": 0, "name": "one", "orgId": "153796267909058560", "parentId": "203459814578196480", "parentName": "大王的", "sortNo": 1, "status": 0, "subRooms": []}]
                }, {
                    "accountNames": ["用户7563", "15018753353"],
                    "childLevel": 2,
                    "createDate": "2021-09-02T14:16:43.292",
                    "creater": "115510501659643904",
                    "description": "飒飒大大",
                    "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}, {"accountId": "152566259219697664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "15018753353", "realName": "王琦5353", "roleList": [{"accountId": "152566259219697664", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}],
                    "id": "202790417903652864",
                    "imgs": ["https://oss.xdeas.com.cn/systemWeb/153796267909058560/163056340005283.jpg", "https://oss.xdeas.com.cn/systemWeb/153796267909058560/1630563400055111.jpg", "https://oss.xdeas.com.cn/systemWeb/153796267909058560/16305634000478.jpg"],
                    "level": 2,
                    "materialCount": 16,
                    "name": "四级区域",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 4,
                    "status": 1,
                    "subRooms": [{
                        "accountNames": [],
                        "childLevel": 1,
                        "createDate": "2021-09-02T14:23:02.564",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [],
                        "id": "202792008685719552",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "分公司的给",
                        "orgId": "153796267909058560",
                        "parentId": "202790417903652864",
                        "parentName": "四级区域",
                        "sortNo": 1,
                        "status": 1,
                        "subRooms": [{"accountNames": ["用户7563"], "childLevel": 0, "createDate": "2021-09-15T11:29:21.253", "creater": "115510501659643904", "description": "", "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}], "id": "207459340800495616", "imgs": [], "level": 4, "materialCount": 0, "name": "区域", "orgId": "153796267909058560", "parentId": "202792008685719552", "parentName": "分公司的给", "sortNo": 1, "status": 1, "subRooms": []}]
                    }, {
                        "accountNames": [],
                        "childLevel": 1,
                        "createDate": "2021-09-02T14:17:34.199",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [],
                        "id": "202790631423086592",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "五级区域",
                        "orgId": "153796267909058560",
                        "parentId": "202790417903652864",
                        "parentName": "四级区域",
                        "sortNo": 2,
                        "status": 1,
                        "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-04T11:02:11.915", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "203466240331616256", "imgs": [], "level": 4, "materialCount": 0, "name": "这是新增的", "orgId": "153796267909058560", "parentId": "202790631423086592", "parentName": "五级区域", "sortNo": 1, "status": 1, "subRooms": []}, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-06T14:04:21.015", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "204236856030662656", "imgs": [], "level": 4, "materialCount": 0, "name": "又卡了特色阿萨屙角色咯破发热二了阿萨特朗普热假的色就是色啊咩", "orgId": "153796267909058560", "parentId": "202790631423086592", "parentName": "五级区域", "sortNo": 2, "status": 1, "subRooms": []}]
                    }]
                }, {
                    "accountNames": ["用户7563", "15018753353", "你爹2222222", "13172049019", "13798182903", "13048034432"],
                    "childLevel": 2,
                    "createDate": "2021-06-02T18:13:16.539",
                    "creater": "115510501659643904",
                    "description": "",
                    "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}, {"accountId": "152566259219697664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "15018753353", "realName": "王琦5353", "roleList": [{"accountId": "152566259219697664", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}, {
                        "accountId": "115510501659643904",
                        "avatar": "https://oss.xdeas.com.cn//avatar/xdeas-avatar-16.png",
                        "mobile": "13798182874",
                        "realName": "王琦a有个车间工程师主管",
                        "roleList": [{"accountId": "115510501659643904", "roleCode": "app_v2Admin", "roleDefaultRole": 1, "roleId": "20110315072342068", "roleName": "团队管理员"}]
                    }, {"accountId": "141612389500981248", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13172049019", "realName": "睁眼", "roleList": [{"accountId": "141612389500981248", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}, {"accountId": "187153734663409664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13798182903", "realName": "2903", "roleList": [{"accountId": "187153734663409664", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}, {
                        "accountId": "194035334802051072",
                        "avatar": "https://oss.xdeas.com.cn/avatar-0.png",
                        "mobile": "13048034432",
                        "realName": "13048034432",
                        "roleList": [{"accountId": "194035334802051072", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]
                    }],
                    "id": "169510265061117952",
                    "imgs": [],
                    "level": 2,
                    "materialCount": 0,
                    "name": "明日黄花好啊2",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 5,
                    "status": 1,
                    "subRooms": [{"accountNames": ["用户7563"], "childLevel": 0, "createDate": "2021-09-01T11:09:34.616", "creater": "115510501659643904", "description": "", "directorInfos": [{"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}], "id": "202380933557391360", "imgs": [], "level": 3, "materialCount": 0, "name": "我又是第", "orgId": "153796267909058560", "parentId": "169510265061117952", "parentName": "明日黄花好啊2", "sortNo": 1, "status": 1, "subRooms": []}, {
                        "accountNames": [],
                        "childLevel": 1,
                        "createDate": "2021-09-03T16:14:28.875",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [],
                        "id": "203182440972292096",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "吊袜带222",
                        "orgId": "153796267909058560",
                        "parentId": "169510265061117952",
                        "parentName": "明日黄花好啊2",
                        "sortNo": 2,
                        "status": 1,
                        "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-08T15:27:02.458", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "204982441562083328", "imgs": [], "level": 4, "materialCount": 0, "name": "侧边新增", "orgId": "153796267909058560", "parentId": "203182440972292096", "parentName": "吊袜带222", "sortNo": 1, "status": 0, "subRooms": []}]
                    }, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-02T15:36:32.262", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "202810504299679744", "imgs": [], "level": 3, "materialCount": 0, "name": "阿达伟大人阿达伟大人阿达伟大人阿达伟大人阿达伟大21达伟大人", "orgId": "153796267909058560", "parentId": "169510265061117952", "parentName": "明日黄花好啊2", "sortNo": 2, "status": 1, "subRooms": []}, {
                        "accountNames": [], "childLevel": 1, "createDate": "2021-08-30T16:47:23.273", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "201741170735321088", "imgs": [], "level": 3, "materialCount": 0, "name": "321但是发射点发飞洒发生飞洒发发", "orgId": "153796267909058560", "parentId": "169510265061117952", "parentName": "明日黄花好啊2", "sortNo": 2, "status": 1, "subRooms": [{
                            "accountNames": ["你爹2222222", "用户7563", "15018753353", "13798182903", "13172049019"],
                            "childLevel": 0,
                            "createDate": "2021-09-02T11:50:07.972",
                            "creater": "115510501659643904",
                            "description": "123",
                            "directorInfos": [{"accountId": "115510501659643904", "avatar": "https://oss.xdeas.com.cn//avatar/xdeas-avatar-16.png", "mobile": "13798182874", "realName": "王琦a有个车间工程师主管", "roleList": [{"accountId": "115510501659643904", "roleCode": "app_v2Admin", "roleDefaultRole": 1, "roleId": "20110315072342068", "roleName": "团队管理员"}]}, {"accountId": "146196128705024000", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13560127563", "realName": "Fang", "roleList": [{"accountId": "146196128705024000", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]}, {
                                "accountId": "152566259219697664",
                                "avatar": "https://oss.xdeas.com.cn/avatar-0.png",
                                "mobile": "15018753353",
                                "realName": "王琦5353",
                                "roleList": [{"accountId": "152566259219697664", "roleCode": "businessManage", "roleDefaultRole": 1, "roleId": "20110316520814250", "roleName": "管理员"}]
                            }, {"accountId": "187153734663409664", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13798182903", "realName": "2903", "roleList": [{"accountId": "187153734663409664", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}, {"accountId": "141612389500981248", "avatar": "https://oss.xdeas.com.cn/avatar-0.png", "mobile": "13172049019", "realName": "睁眼", "roleList": [{"accountId": "141612389500981248", "roleCode": "businessExecutor", "roleDefaultRole": 1, "roleId": "20110316581288075", "roleName": "普通成员"}]}],
                            "id": "202753527657795584",
                            "imgs": [],
                            "level": 4,
                            "materialCount": 0,
                            "name": "区域区域区域区域区域区域",
                            "orgId": "153796267909058560",
                            "parentId": "201741170735321088",
                            "parentName": "321但是发射点发飞洒发生飞洒发发",
                            "sortNo": 2,
                            "status": 1,
                            "subRooms": []
                        }]
                    }]
                }, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-08T14:27:46.291", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "204967525920804864", "imgs": [], "level": 2, "materialCount": 0, "name": "这是我随便添加333", "orgId": "153796267909058560", "parentId": "153796269314150400", "parentName": "全厂区的", "sortNo": 7, "status": 1, "subRooms": []}, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-08T17:16:59.098", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "205010109875621888", "imgs": [], "level": 2, "materialCount": 0, "name": "大大大", "orgId": "153796267909058560", "parentId": "153796269314150400", "parentName": "全厂区的", "sortNo": 8, "status": 1, "subRooms": []}, {
                    "accountNames": ["你爹2222222"],
                    "childLevel": 0,
                    "createDate": "2021-09-15T14:08:14.622",
                    "creater": "115510501659643904",
                    "description": "321321321",
                    "directorInfos": [{"accountId": "115510501659643904", "avatar": "https://oss.xdeas.com.cn//avatar/xdeas-avatar-16.png", "mobile": "13798182874", "realName": "王琦a有个车间工程师主管", "roleList": [{"accountId": "115510501659643904", "roleCode": "app_v2Admin", "roleDefaultRole": 1, "roleId": "20110315072342068", "roleName": "团队管理员"}]}],
                    "id": "207499326639837184",
                    "imgs": [],
                    "level": 2,
                    "materialCount": 0,
                    "name": "这是我随便添加的",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 9,
                    "status": 1,
                    "subRooms": []
                }, {"accountNames": [], "childLevel": 1, "createDate": "2021-09-27T10:37:36.136", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211794971374653440", "imgs": [], "level": 2, "materialCount": 0, "name": "新车间", "orgId": "153796267909058560", "parentId": "153796269314150400", "parentName": "全厂区的", "sortNo": 17, "status": 0, "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:37:45.033", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211795008691376128", "imgs": [], "level": 3, "materialCount": 0, "name": "老空压机房", "orgId": "153796267909058560", "parentId": "211794971374653440", "parentName": "新车间", "sortNo": 1, "status": 0, "subRooms": []}]}, {
                    "accountNames": [],
                    "childLevel": 1,
                    "createDate": "2021-09-27T10:41:04.241",
                    "creater": "115510501659643904",
                    "description": "",
                    "directorInfos": [],
                    "id": "211795844234481664",
                    "imgs": [],
                    "level": 2,
                    "materialCount": 0,
                    "name": "综合楼",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 18,
                    "status": 0,
                    "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:41:14.282", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211795886345293824", "imgs": [], "level": 3, "materialCount": 0, "name": "综合楼电房", "orgId": "153796267909058560", "parentId": "211795844234481664", "parentName": "综合楼", "sortNo": 1, "status": 0, "subRooms": []}, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:43:22.452", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211796423929237504", "imgs": [], "level": 3, "materialCount": 0, "name": "综合楼一楼电柜", "orgId": "153796267909058560", "parentId": "211795844234481664", "parentName": "综合楼", "sortNo": 2, "status": 0, "subRooms": []}, {
                        "accountNames": [],
                        "childLevel": 0,
                        "createDate": "2021-09-27T10:46:54.350",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [],
                        "id": "211797312693866496",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "综合楼一楼车间",
                        "orgId": "153796267909058560",
                        "parentId": "211795844234481664",
                        "parentName": "综合楼",
                        "sortNo": 3,
                        "status": 0,
                        "subRooms": []
                    }, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:47:26.201", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211797446286643200", "imgs": [], "level": 3, "materialCount": 0, "name": "综合楼三楼", "orgId": "153796267909058560", "parentId": "211795844234481664", "parentName": "综合楼", "sortNo": 19, "status": 1, "subRooms": []}, {"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:48:10.697", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211797632916393984", "imgs": [], "level": 3, "materialCount": 0, "name": "综合楼四楼", "orgId": "153796267909058560", "parentId": "211795844234481664", "parentName": "综合楼", "sortNo": 20, "status": 0, "subRooms": []}, {
                        "accountNames": [],
                        "childLevel": 0,
                        "createDate": "2021-09-27T10:48:41.657",
                        "creater": "115510501659643904",
                        "description": "",
                        "directorInfos": [],
                        "id": "211797762772045824",
                        "imgs": [],
                        "level": 3,
                        "materialCount": 0,
                        "name": "综合楼六楼",
                        "orgId": "153796267909058560",
                        "parentId": "211795844234481664",
                        "parentName": "综合楼",
                        "sortNo": 21,
                        "status": 0,
                        "subRooms": []
                    }]
                }, {"accountNames": [], "childLevel": 1, "createDate": "2021-09-27T10:49:54.786", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211798069497303040", "imgs": [], "level": 2, "materialCount": 0, "name": "老电房", "orgId": "153796267909058560", "parentId": "153796269314150400", "parentName": "全厂区的", "sortNo": 19, "status": 0, "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:50:12.111", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211798142163619840", "imgs": [], "level": 3, "materialCount": 0, "name": "老电房", "orgId": "153796267909058560", "parentId": "211798069497303040", "parentName": "老电房", "sortNo": 1, "status": 0, "subRooms": []}]}, {
                    "accountNames": [],
                    "childLevel": 1,
                    "createDate": "2021-09-27T10:51:04.183",
                    "creater": "115510501659643904",
                    "description": "",
                    "directorInfos": [],
                    "id": "211798360569417728",
                    "imgs": [],
                    "level": 2,
                    "materialCount": 0,
                    "name": "老车间",
                    "orgId": "153796267909058560",
                    "parentId": "153796269314150400",
                    "parentName": "全厂区的",
                    "sortNo": 20,
                    "status": 0,
                    "subRooms": [{"accountNames": [], "childLevel": 0, "createDate": "2021-09-27T10:51:17.124", "creater": "115510501659643904", "description": "", "directorInfos": [], "id": "211798414847905792", "imgs": [], "level": 3, "materialCount": 0, "name": "一楼电房", "orgId": "153796267909058560", "parentId": "211798360569417728", "parentName": "老车间", "sortNo": 1, "status": 0, "subRooms": []}]
                }],
                "type": "1"
            }]

            // this.$axios.get(this.$url.selectEngineroomList, {
            //     params: {
            //         orgId: this.$store.state.user.info.currentUserDTO.organizationId
            //     }
            // }).then((data) => {
            //     this.areaList = data.data
            //     this.disabledItem(this.areaList)
            // })
        },

    },
}
</script>

<style scoped>

</style>